package com.devilvan.betrice.douban.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
* @author Evad.Wu
* @Description 豆瓣-短评表 映射
* @date 2022-12-15
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "DOUBAN_COMMENT")

@Entity
@Table(name = "DOUBAN_COMMENT")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "豆瓣-短评表 映射")
public class DoubanCommentPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -4418447120285834562L;
    @Schema(description = "电影系统ID")
    @TableField(value = "PID")
    @Column(name = "PID", columnDefinition = "BIGINT(19) NOT NULL COMMENT '电影系统ID'")
    private Long pid;
    @Schema(description = "评论ID")
    @TableField(value = "COMMENT_ID")
    @Column(name = "COMMENT_ID", columnDefinition = "BIGINT(19) NOT NULL COMMENT '评论ID'")
    private Long commentId;
    @Schema(description = "评论人")
    @TableField(value = "REVIEWER")
    @Column(name = "REVIEWER", columnDefinition = "VARCHAR(128) COMMENT '评论人'")
    private String reviewer;
    @Schema(description = "评论人主页")
    @TableField(value = "REVIEWER_URL")
    @Column(name = "REVIEWER_URL", columnDefinition = "TEXT(65,535) COMMENT '评论人主页'")
    private String reviewerUrl;
    @Schema(description = "观看状态，1-看过 0-没看过")
    @TableField(value = "WATCHED_STATUS")
    @Column(name = "WATCHED_STATUS", columnDefinition = "BIT(1) COMMENT '观看状态，1-看过 0-没看过'")
    private Boolean watchedStatus;
    @Schema(description = "推荐星级，5-力荐 4-推荐 3-还行 2-较差 1-很差")
    @TableField(value = "RANK_STAR")
    @Column(name = "RANK_STAR", columnDefinition = "INT(10) COMMENT '推荐星级，5-力荐 4-推荐 3-还行 2-较差 1-很差'")
    private Integer rankStar;
    @Schema(description = "评论日期")
    @TableField(value = "COMMENT_DATE")
    @Column(name = "COMMENT_DATE", columnDefinition = "DATETIME COMMENT '评论日期'")
    private Date commentDate;
    @Schema(description = "认同数")
    @TableField(value = "AFFIRM")
    @Column(name = "AFFIRM", columnDefinition = "INT(10) COMMENT '认同数'")
    private Integer affirm;
    @Schema(description = "评论内容")
    @TableField(value = "CONTENT")
    @Column(name = "CONTENT", columnDefinition = "TEXT(65,535) COMMENT '评论内容'")
    private String content;
}
